require(covadap)
# Create a sample dataset
df1 <- data.frame("gender" = sample(c("female", "male"), 100, TRUE, c(1 / 3, 2 / 3)),
"age" = sample(c("18-35", "36-50", ">50"), 100, TRUE),
"bloodpressure" = sample(c("normal", "high", "hyper"), 100, TRUE),
stringsAsFactors = TRUE)
# To just view a summary of the metrics of the design
PocSim(df1, p = 0.85, print.results = TRUE)
# To view a summary
# and create a list containing all the metrics of the design
res <- PocSim(df1, p = 0.85, print.results = TRUE)
res
Run the code above in your browser using DataLab